//http://docs.oracle.com/javase/7/docs/api/
//http://pydoing.blogspot.tw/2011/05/java-basic-concept-of-gui.html
import java.io.*;
import java.util.*;
import java.lang.Math;
import javax.swing.*;
import java.awt.*;

public class Main{  
	
	public static void main(String[] args) {  
		int oldtime=0;

/*
		oldtime=(int)System.currentTimeMillis();
		while(((int)System.currentTimeMillis()-oldtime)<3000)
		{
System.out.println("wait time="+((int)System.currentTimeMillis()-oldtime));
		};	
*/

        JFrame demo = new JFrame();
        demo.setSize(400, 300);
        demo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         
        JCheckBox checkbox = new JCheckBox("JCheckBox");
        JRadioButton radiobutton = new JRadioButton("JRadiobutton");
        JButton button = new JButton("JButton");
        JLabel label = new JLabel("JLabel");
        JTextArea textarea = new JTextArea("JTextArea");
         
        demo.getContentPane().add(BorderLayout.EAST, checkbox);
        demo.getContentPane().add(BorderLayout.WEST, radiobutton);
        demo.getContentPane().add(BorderLayout.SOUTH, button);
        demo.getContentPane().add(BorderLayout.NORTH , label);
        demo.getContentPane().add(BorderLayout.CENTER, textarea);
         
        demo.setVisible(true);

	}


}